package dao.impl;

import dao.RecruitmentGroupDao;
import domain.RecruitmentGroup;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by aceyin on 15/7/7.
 */
@Repository
public class RecruitmentGroupDaoImpl extends BaseGenericDao<RecruitmentGroup, Integer> implements RecruitmentGroupDao {
    @Override
    public List<RecruitmentGroup> findByStatus(String status) {
        Map<String, Object> params = newMapBuilder().put("status", status).build();
        return queryList("find-by-status", params);
    }

    @Override
    public RecruitmentGroup findByCode(String code) {
        Map<String, Object> params = newMapBuilder().put("code", code).build();
        return queryOne("find-by-code", params);
    }
}
